<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="<?php echo $this->_webroot('skin/css/admin.css'); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo $this->_webroot('skin/css/main.css'); ?>">
<style>
td span {color:red;}
</style>
</head>
<body>
<div id="maincontent">
<psp:tags     htmlname='messagebox'  iconname='messagebox' />
	<div class="wrap">
	<div class="crumbs">当前位置 &gt;&gt; 商铺管理 &gt;&gt; 修改分类</div>
        <hr />
	<div class="infobox">
	<h3><span class="left">修改分类 </span><span style="margin-right:15px;" class="right"><a style="float:right;" href="<?php echo $this->_url('admin/shop/categorieslist');?>">商品分类列表</a></span></h3>
    <div class="content2">
		<form action="<?php echo $this->_url('admin/shop/categoriesedit/'.$info['id']);?>" method="post" onsubmit="return checkform();">
		<table class="form-table">
		  <tbody>
			<tr>
				<td width="60px;">上级分类：</td>
				<td>
				<select name="data[shopcategories][parent_id]" >
				<option value="0">顶级分类</option>
				<?php foreach($category_dg as $value) {?>
				<option value="<?php echo $value['id'];?>" <?php if($value['id']==$info['parent_id']) echo "selected";?>><?php echo $value['str_pad'];?><?php echo $value['cat_name'];?></option>
				<?php }?>
				</select>&nbsp;&nbsp;&nbsp;(支持二级分类)</td>
			</tr>
			<tr>
				<td>分类名称：</td>
				<td><input class="small-text" type="text" name="data[shopcategories][cat_name]" value="<?php echo $info['cat_name']; ?>" /> <span>*</span></td>
			</tr>
			<tr>
				<td>分类排序：</td>
				<td><input class="small-text" type="text" name="data[shopcategories][sort_order]" value="<?php echo $info['sort_order']; ?>" style="width:60px" /> <span>*</span></td>
			</tr>
			<tr>
				<td colspan="2">
				<input type="hidden" name="data[shopcategories][id]" value="<?php echo $info['id']; ?>">
				<span class="button-container"><input class="regular-button" type="submit" name="submit" value="添加分类" /></span>
				</td>
			</tr>
		  </tbody>
		</table>
		</form>
	  </div>
	 </div>
	</div>
</div>
<script>
function checkform() {
	var cat_name = document.getElementsByName('cat_name')[0];
	if(cat_name.value=='') {
		ShowMessageBox("分类名称不能为空！",'0');
		return false;
	}
	return true;
}
</script>
</body>
</html>